from mcp.server.fastmcp import FastMCP
import datetime

mcp = FastMCP("DemoServer")

@mcp.tool()
def fetch_logistics_information(logistics_number:str) -> dict:
    """

    """
    #模拟从物流服务系统获取数据的过程
    logistics_data = {
        "logistics_number": logistics_number,
        "current_location":"cityx , countryy",
        "last_update_time":
        datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
        "events":[
            {
                "event_type":"Pickup",
                "time":"",
                "location":"Warehouse A,City z,country w"
            }
        ]
    }
    return logistics_data

